#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import re

def myprint(obj, end='\n'):
    sys.stdout.write(str(obj) + end)

def main():
    v1='''
<div class="parity0 source"><a href="#l29" id="l29">    29</a> #include &lt;stdio.h&gt;
</div>
<div class="parity1 source"><a href="#l30" id="l30">    30</a> #include &lt;sys/strlog.h&gt;
</div>
'''
    string = str(v1.strip())
    Rex2 = re.compile(r'(?<=</a>).+?(?=</div>)', re.IGNORECASE|re.M|re.DOTALL)
    string=string.replace("&lt;","<").replace("&gt;",">")
    codes = Rex2.findall(string)

    if not codes:
        myprint("No codes")
    else:
        myprint(codes)


if __name__ == '__main__':
    main()
    myprint('done')
